googleSignInRequired
Type
handler
Summary
Find out if a user is already authenticated
Syntax
googleSignInRequired()
Description
Use the googleSignInRequired handler if you want to check whether a previously authenticated Google account exists, and sign-in automatically without presenting a sign-in dialog if so.
Examples
on openCard
updateAuthUI googleSignInRequired()
end openCard
command updateAuthUI pSignInRequired
if pSignInRequired then
// Display the UI which prompts the user to click to sign in
put empty into field "name"
put empty into field "email"
hide group "header"
show group "auth"
else
// Display signed-in UI with user details
show group "header"
hide group "auth"
put googleGetSignInDisplayName() into field "name"
put googleGetSignInEmail() into field "email"
end if
end updateAuthUI
Value
| Name | Type | Description |
|---|---|---|
return | The googleSignInRequired handler returns false if an account is already authenticated, or true if the authentication dialog is required. |
Related
handler: googleSignIn
Compatibility and Support
OS
android